package com.xjscrm.console.mapper;

import com.xjscrm.console.dto.chat.ChatWordsLibraryQueryDTO;
import com.xjscrm.console.entity.ChatWordsLibrary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author mingyang.chen create in 2024/3/15 14:51
 */
@Mapper
public interface ChatWordsLibraryMapper extends CommonMapper<ChatWordsLibrary> {
    int deleteByPrimaryKey(Long id);

    int insertSelective(ChatWordsLibrary record);

    ChatWordsLibrary selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ChatWordsLibrary record);

    List<ChatWordsLibrary> query(@Param("merId") Long merId, @Param("staffId") Long id,
                                 @Param("query") ChatWordsLibraryQueryDTO query);

    int countByGroupId(@Param("merId") Long merId, @Param("groupId") Long groupId);

    ChatWordsLibrary selectById(@Param("merId") Long merId, @Param("id") Long id);

    Integer selectMaxSort(@Param("merId") Long merId, @Param("staffId") Long staffId);
}